package com.shxy.dao;

import com.shxy.entity.user.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface UserDao extends JpaRepository<User, Integer>, PagingAndSortingRepository<User, Integer> {

    /**
     * 根据编号查询用户
     * @param id
     * @return
     */
    User findById(int id);

    /**
     * 根据账号查询用户信息
     * @param username
     * @return
     */
    User findByUsername(String username);
}
